<?php include "../service/util/authenticateSession.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>Dịch Vụ</title>
	<?php 
		include("import.php");
		include "../service/serviceService.php";
	?>
</head>
<body>
<?php include "header.php"; ?>
<form id="form" method="get">
<!-- Container -->
<div id="container">
    <div class="shell"> 
        <!-- Main -->
        <div id="main">
            <div class="cl">&nbsp;</div>
            <!-- Content -->
            <div id="content">
                <!-- Box -->
                <div class="box">
                    <!-- Box Head -->
                    <div class="box-head">
                        <h2 class="left">Danh Sách Dịch Vụ</h2> 
                    </div>
                    <!-- End Box Head -->	    
                    <!-- Table -->
                    <div class="table">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <th>STT</th>
                                <th>Tựa (Tiếng Việt)</th>
                                <th>Tựa (Tiếng Anh)</th>
                            </tr>
                            <?php
								$result = findAllServices('VN');
								$count = 0;
								while($row = ConnectionManager::getInstance()->fetch($result)){
									$count++;
                            ?>
                            <tr>
                            	<td><?php echo $count; ?></td>
                                <td><a href="service-detail.php?id=<?php echo $row["SEV_ID"]; ?>"><?php echo $row["SEV_TITLE_VN"]; ?></a></td>
                                <td><?php echo $row["SEV_TITLE_EN"]; ?></td>
                            </tr>
                            <?php
                            	}
							?>
                        </table>
                        
                    </div>
                    <!-- Table -->
                </div>
                <!-- End Box -->
            </div>
            <!-- End Content -->
            <div class="cl">&nbsp;</div>			
        </div>
        <!-- Main -->
    </div>
</div>
<!-- End Container -->
</form>
<?php 
	include "footer.php";
	ConnectionManager::getInstance()->closeConnection(); 
?>
</body>
</html>